package com.xmb.wcapi.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xmb.wcapi.entity.BaseMaterial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huangping
 * @since 2024-06-14
 */
public interface BaseMaterialMapper extends BaseMapper<BaseMaterial> {

    @DS("db1")
    /** 查询指定供应商的母件编码 */
    Page<BaseMaterial> getBaseMaterialList(Page<?> page,  @Param("ew") QueryWrapper<BaseMaterial> ew);

    @DS("db1")
    int getBaseMaterialListCount(@Param("ew") QueryWrapper<BaseMaterial> ew);

    @DS("db1")
    List<BaseMaterial> selectSon(@Param("bomId") String bomId);

    @DS("db1")
    List<BaseMaterial> getBaseMaterialOne(@Param("bomId")String bomId,@Param("cusCode") String cusCode);

    List<String> selectBaseMaterialAllGroupList();

    List<BaseMaterial> getMaterialNext();
}
